import request from '@/utils/_request'
/**查询大赛列表*/
export  function geteventList(data){
    return request({
        url:'/admin/competition/query',
        method:'POST',
        data:data
    })
}
/**修改大赛状态*/
export function getEvent(id){
    return request({
        url:'/admin/system/dict/data/'+id,
        method:'GET'
    })
}
/**导入文件*/
export function UploadDoc(file){
    return request({
        url:'/admin/competition/include',
        method:'POST',
        data:file
    })
}
/**修改大赛状态*/
export function updateEvnet(data){
    return request({
        url:'/admin/system/dict/data',
        method:'PUT',
        data:data
    })
}
/**单个增加赛事*/
export function addEvent(data){
    return request({
        url:'/admin/system/dict/data',
        method:'POST',
        data:data
    })
}
/**删除*/
export function delEvent(id){
    const data = {
        id : null,
        ids : null
    }
    if (id.length>1){
        data.ids = id
    }else {
        data.id = id
    }
    return request({
        url:'/admin/competition/compeition/delete',
        method:'DELETE',
        data:data
    })
}
export function changeEvent(data){
    return request({
        url:'/admin/competition/competition/forbidden',
        method:'PUT',
        data:data
    })
}
export function changeItem(data){
    return request({
        url:'/admin/competition/item/forbidden',
        method:'PUT',
        data:data
    })
}
/**删除赛项*/
export function delItem(id){
    const data = {
        id : null,
        ids : null
    }
    if (id.length>1){
        data.ids = id
    }else {
        data.id = id
    }
    return request({
        url:'/admin/competition/item/delete',
        method:'DELETE',
        data:data
    })
}